package cn.wolfcode.vo;

import lombok.Data;

/**
 * 封装json返回结果
 *
 * @author 杨兴健
 * @Date 2020/7/9 0:16
 */
public class JsonResult {
    public JsonResult() {
        this.success = true;
        this.msg = "操作成功！";
    }

    public JsonResult(boolean success, String msg) {
        this.success = success;
        this.msg = msg;
    }

    public boolean isSuccess() {
        return success;
    }

    public JsonResult setSuccess(boolean success) {
        this.success = success;
        return this;
    }

    public String getMsg() {
        return msg;
    }

    public JsonResult setMsg(String msg) {
        this.msg = msg;
        return this;
    }

    /**
     * 是否成功
     */
    private boolean success;
    /**
     * 返回信息
     */
    private String msg;
}
